package com.oig.sys.minio;


import com.oig.sys.minio.config.MinIOProperties;
import com.oig.sys.minio.core.MinIOTemplate;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@RequiredArgsConstructor
@Configuration(proxyBeanMethods = false)
@EnableConfigurationProperties(MinIOProperties.class)
public class MinioAutoConfiguration {

    @Bean
    public MinIOTemplate minIOTemplate(MinIOProperties minIOProperties) throws Exception {
        return new MinIOTemplate(minIOProperties);
    }

}
